package com.woniuxy.his.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private boolean success;
    private String code;
    private String message;
    private Object data;

    //失败
    public static Result fail(String code,String message,Object data){
        return new Result(false,code,message,data);
    }

    //成功
    public static Result success(String code,String message,Object data){
        return new Result(true,code,message,data);
    }

}
